<?php
$v_parent_id =  "";
if(isset($_REQUEST['hdn_parent_item_id'])){
	$v_parent_id  = $_REQUEST['hdn_parent_item_id'];
}
$v_unit_id = $_REQUEST['hdn_list_item_id'];

if(_is_sqlserver()){
	$cmd = mssql_init("USER_UnitDelete",$conn); 
	mssql_bind($cmd, "@p_item_id", $v_unit_id, SQLINT4);
	$result = mssql_execute($cmd); 
	$rs = @mssql_fetch_array($result);
	$v_error = _replace_bad_char(trim($rs['RET_ERROR']));
	if (!is_null($v_error) and $v_error<>""){?>
		<script>
			alert("<? echo $v_error; ?>");
			window.history.back();
		</script><?
		exit;
	}
}?>
<form action="index.php"  Name="f_back" method="post">
	<input type="hidden" name="fuseaction" value="DISPLAY_ALL_STAFF">	
	<input type="hidden" name="hdn_item_id" value="<?php echo $v_unit_id;?>">
	<input type="hidden" name="hdn_parent_item_id" value="<?php echo $v_parent_id;?>">
</form>		
<Script language="javascript">	
	document.forms(0).submit();
</Script> 


